package com.naiterui.ehp.bs.recommend.repository.mysql;

import java.util.Collection;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bs.recommend.bean.RecomPrescription;

@Repository
public interface IRecommPrescriptionRepository extends BaseJpaRepository<RecomPrescription, Long> {

    //RecommPrescription findByRecomIdAndType(Long recomId, Integer type);
    RecomPrescription findFirstByRecommendIdAndTypeOrderByIdDesc(Long recomId, Integer type);

    List<RecomPrescription> findByRecommendIdInAndType(Collection<Long> recomIds, Integer type);

    List<RecomPrescription> findByRecommendIdIn(Collection<Long> recomIds);
}
